The universal serial bus (USB) provides a low cost solution for attaching peripheral devices to a host, such as a host computer (i.e., personal computer such as a laptop or desktop or other host) or host server, so that the peripheral devices and the host can communicate with each other. Devices that are attached to a USB bus are automatically detected and software automatically configures the devices for immediate use, typically without user intervention. The USB devices/peripherals may include devices such as printers, scanners, keyboards, a mouse, digital cameras, digital video cameras, data acquisition devices, modems, speakers, telephones or video phones, storage devices such as ZIP drives, or other peripherals or devices.
Typically, a USB bus may include a host computer connected by a USB cable to one or more peripherals/devices or hubs. A USB bus can be extended with a hub which permits additions peripherals, or other hubs, to be coupled to the USB bus. By convention, data transmitted in the direction of the peripheral device is said to be in the “downstream” direction, while data transmitted in the direction of the host computer is said to be in the “upstream” direction.
When multiple peripherals are coupled to a USB bus, each peripheral typically only sees messages or data from the host computer which is intended for the peripheral. For instance, in FIG. 1, a host computer 20, having printing software 21, is coupled with a printer 22 have been a USB printer engine 24 and a flash media card reader 26 coupled the with the host computer 20 through hub of 28. When a flash media card is inserted into reader 26, host computer 20 obtains the data from the reader 26 and effects printer engine 24 to print of one or more images using printing software 21. In this example, printer engine 24 and reader 26 are typically not able to communicate with one another unless host computer 20 is provided, and even in that instance, each peripheral communicates 24, 26 with the host computer 20 and the host computer 20 determines what data should be sent to particular peripherals.
Recently, an extension to the USB specification includes an “on the go” (OTG) feature which permits two USB devices coupled to one another to communicate with one another without the presence of a host computer. FIG. 2 illustrates one example of such a configuration, wherein a USB printer 30 is coupled with a flash media card reader 32 with OTG capabilities, wherein reader 32 may operate as a host in this configuration to control the printer 30. While OTG capabilities of the system of FIG. 2 allows devices 30, 32 to communicate with one another, the configuration of FIG. 2 does not support the dynamic addition of the two devices to a USB bus controlled by a host computer.
Accordingly, as recognized by the present inventor, what is needed is a method and apparatus for USB peripherals to communicate with each other when no host computer is present, or to communicate with a host computer if present.
It is against this background that various embodiments of the present invention were developed.